#ifndef LOGGER_H_JM_20121105
#define LOGGER_H_JM_20121105

#include <iostream>
#include <sstream>
#include <typeinfo>
#include <set>
#include <string>
#include <algorithm>
// logger


#include "LoggerActivators.h"
#include "LogAppender.h"
#include "LogAppenderRegistrator.h"

namespace jmlib {

	class Logger {	
	public:
		const std::string& getId() const { return loggerId_; }

		Logger(const std::string& loggerId) : loggerId_(loggerId) {
			LoggerRegister::getInstance()->addLogger(loggerId_);
		}

		LoggerRegister::LogAppenderSet::iterator getLogAppenderBegin() {
			return LoggerRegister::getInstance()->getLogAppenderBegin(loggerId_);
		} 

		LoggerRegister::LogAppenderSet::iterator getLogAppenderEnd() {
			return LoggerRegister::getInstance()->getLogAppenderEnd(loggerId_);
		}
	private:
		std::string loggerId_;

	};
} //namespace jmlib 



#endif
